
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module gummworld2.geometry</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="gummworld2.html"><font color="#ffffff">gummworld2</font></a>.geometry</strong></big></big> (version $Id: geometry.py 410 2013-08-18 06:19:10Z stabbingfinger@gmail.com $)</font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:///C:/cygwin/home/bw/devel/python/svn/gummworld2_devel/gamelib/gummworld2/geometry.py">c:\cygwin\home\bw\devel\python\svn\gummworld2_devel\gamelib\gummworld2\geometry.py</a></font></td></tr></table>
    <p><tt>geometry.py&nbsp;-&nbsp;Geometry&nbsp;module&nbsp;for&nbsp;Gummworld2.<br>
&nbsp;<br>
Geometry&nbsp;classes&nbsp;and&nbsp;functions.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="pygame.html">pygame</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="gummworld2.geometry.html#CircleGeometry">CircleGeometry</a>
</font></dt><dt><font face="helvetica, arial"><a href="gummworld2.geometry.html#Ellipse">Ellipse</a>
</font></dt><dt><font face="helvetica, arial"><a href="gummworld2.geometry.html#LineGeometry">LineGeometry</a>
</font></dt><dt><font face="helvetica, arial"><a href="gummworld2.geometry.html#PolyGeometry">PolyGeometry</a>
</font></dt><dt><font face="helvetica, arial"><a href="gummworld2.geometry.html#RectGeometry">RectGeometry</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="pygame.html#Rect">pygame.Rect</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="gummworld2.geometry.html#Diamond">Diamond</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="CircleGeometry">class <strong>CircleGeometry</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="CircleGeometry-__init__"><strong>__init__</strong></a>(self, origin, radius)</dt></dl>

<dl><dt><a name="CircleGeometry-getorigin"><strong>getorigin</strong></a>(self)</dt></dl>

<dl><dt><a name="CircleGeometry-getposition"><strong>getposition</strong></a>(self)</dt><dd><tt>GOTCHA:&nbsp;Something&nbsp;like&nbsp;"circle_geom.position.x&nbsp;+=&nbsp;1"&nbsp;will&nbsp;not&nbsp;do&nbsp;what<br>
you&nbsp;expect.&nbsp;That&nbsp;operation&nbsp;does&nbsp;not&nbsp;update&nbsp;the&nbsp;rect&nbsp;instance&nbsp;variable.<br>
Instead&nbsp;use&nbsp;"circle_geom.position&nbsp;+=&nbsp;(1,0)".</tt></dd></dl>

<dl><dt><a name="CircleGeometry-getradius"><strong>getradius</strong></a>(self)</dt></dl>

<dl><dt><a name="CircleGeometry-setposition"><strong>setposition</strong></a>(self, val)</dt></dl>

<dl><dt><a name="CircleGeometry-setradius"><strong>setradius</strong></a>(self, val)</dt></dl>

<hr>
Static methods defined here:<br>
<dl><dt><a name="CircleGeometry-collided"><strong>collided</strong></a> = circle_collided_other(self, other, rect_pre_tested<font color="#909090">=None</font>)</dt><dd><tt>Return&nbsp;results&nbsp;of&nbsp;collision&nbsp;test&nbsp;between&nbsp;a&nbsp;circle&nbsp;and&nbsp;other&nbsp;geometry.<br>
&nbsp;<br>
The&nbsp;*_collided_other()&nbsp;functions&nbsp;provide&nbsp;a&nbsp;convenient&nbsp;means&nbsp;to&nbsp;test<br>
disparate&nbsp;geometries&nbsp;for&nbsp;collision.&nbsp;The&nbsp;logic&nbsp;considers&nbsp;containment&nbsp;to&nbsp;be<br>
a&nbsp;collision.&nbsp;The&nbsp;tests&nbsp;do&nbsp;not&nbsp;check&nbsp;for&nbsp;the&nbsp;"self&nbsp;is&nbsp;other"&nbsp;condition.<br>
&nbsp;<br>
self&nbsp;is&nbsp;a&nbsp;circle,&nbsp;it&nbsp;must&nbsp;have&nbsp;origin&nbsp;and&nbsp;radius&nbsp;attrs.<br>
&nbsp;<br>
If&nbsp;other&nbsp;does&nbsp;not&nbsp;have&nbsp;a&nbsp;collided&nbsp;attr,&nbsp;then&nbsp;a&nbsp;circle-vs-rect&nbsp;result&nbsp;is<br>
returned.<br>
&nbsp;<br>
Otherwise...<br>
&nbsp;<br>
other&nbsp;must&nbsp;have&nbsp;attr&nbsp;collided.&nbsp;collided&nbsp;must&nbsp;be&nbsp;a&nbsp;staticmethod<br>
*_collided_other&nbsp;function&nbsp;or&nbsp;a&nbsp;custom&nbsp;function&nbsp;in&nbsp;that&nbsp;form.&nbsp;If&nbsp;collided&nbsp;is<br>
not&nbsp;one&nbsp;of&nbsp;the&nbsp;*_collided_other&nbsp;functions,&nbsp;other's&nbsp;collided&nbsp;function&nbsp;will<br>
be&nbsp;called&nbsp;passing&nbsp;arguments&nbsp;other&nbsp;and&nbsp;self&nbsp;in&nbsp;that&nbsp;order.<br>
&nbsp;<br>
other's&nbsp;collided&nbsp;attr&nbsp;dictates&nbsp;the&nbsp;kind&nbsp;of&nbsp;self-vs-other&nbsp;collision&nbsp;test.&nbsp;The<br>
builtin&nbsp;collision&nbsp;tests&nbsp;are:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;1.&nbsp;&nbsp;If&nbsp;other.collided&nbsp;is&nbsp;circle_collided_other,&nbsp;other&nbsp;is&nbsp;assumed&nbsp;to&nbsp;be&nbsp;a<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;circle&nbsp;with&nbsp;origin&nbsp;and&nbsp;radius&nbsp;attrs.<br>
&nbsp;&nbsp;&nbsp;&nbsp;2.&nbsp;&nbsp;If&nbsp;other.collided&nbsp;is&nbsp;rect_collided_other,&nbsp;other&nbsp;is&nbsp;assumed&nbsp;to&nbsp;be&nbsp;a<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rect&nbsp;with&nbsp;a&nbsp;rect&nbsp;attr.<br>
&nbsp;&nbsp;&nbsp;&nbsp;3.&nbsp;&nbsp;If&nbsp;other.collided&nbsp;is&nbsp;poly_collided_other,&nbsp;other&nbsp;is&nbsp;assumed&nbsp;to&nbsp;be&nbsp;a<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;poly&nbsp;with&nbsp;a&nbsp;points&nbsp;attr.<br>
&nbsp;&nbsp;&nbsp;&nbsp;4.&nbsp;&nbsp;If&nbsp;other.collided&nbsp;is&nbsp;line_collided_other,&nbsp;other&nbsp;is&nbsp;assumed&nbsp;to&nbsp;be&nbsp;a<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;line&nbsp;with&nbsp;an&nbsp;end_points&nbsp;attr.<br>
&nbsp;<br>
The&nbsp;fall-through&nbsp;action&nbsp;is&nbsp;to&nbsp;call&nbsp;other.<a href="#CircleGeometry-collided">collided</a>(other,&nbsp;self),&nbsp;which&nbsp;is<br>
assumed&nbsp;to&nbsp;be&nbsp;a&nbsp;custom&nbsp;staticmethod&nbsp;function.<br>
&nbsp;<br>
Here&nbsp;is&nbsp;an&nbsp;example&nbsp;minimal&nbsp;class&nbsp;and&nbsp;usage:<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;class&nbsp;CircleGeom(<a href="__builtin__.html#object">object</a>):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def&nbsp;<a href="#CircleGeometry-__init__">__init__</a>(self,&nbsp;**kwargs):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.<strong>__dict__</strong>.update(kwargs)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collided&nbsp;=&nbsp;staticmethod(circle_collided_other)<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;circle&nbsp;=&nbsp;CircleGeom(origin=(300,300),&nbsp;radius=25)<br>
&nbsp;&nbsp;&nbsp;&nbsp;circle.collide(circle,&nbsp;other_poly)</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>origin</strong></dt>
</dl>
<dl><dt><strong>position</strong></dt>
<dd><tt>GOTCHA:&nbsp;Something&nbsp;like&nbsp;"circle_geom.position.x&nbsp;+=&nbsp;1"&nbsp;will&nbsp;not&nbsp;do&nbsp;what<br>
you&nbsp;expect.&nbsp;That&nbsp;operation&nbsp;does&nbsp;not&nbsp;update&nbsp;the&nbsp;rect&nbsp;instance&nbsp;variable.<br>
Instead&nbsp;use&nbsp;"circle_geom.position&nbsp;+=&nbsp;(1,0)".</tt></dd>
</dl>
<dl><dt><strong>radius</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Diamond">class <strong>Diamond</strong></a>(<a href="pygame.html#Rect">pygame.Rect</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="gummworld2.geometry.html#Diamond">Diamond</a></dd>
<dd><a href="pygame.html#Rect">pygame.Rect</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Diamond-__init__"><strong>__init__</strong></a>(self, *args)</dt><dd><tt><a href="#Diamond">Diamond</a>(left,&nbsp;top,&nbsp;width,&nbsp;height)&nbsp;:&nbsp;<a href="pygame.html#Rect">Rect</a><br>
<a href="#Diamond">Diamond</a>((left,&nbsp;top),&nbsp;(width,&nbsp;height))&nbsp;:&nbsp;<a href="pygame.html#Rect">Rect</a><br>
<a href="#Diamond">Diamond</a>(<a href="__builtin__.html#object">object</a>)&nbsp;:&nbsp;<a href="pygame.html#Rect">Rect</a><br>
&nbsp;<br>
Construct&nbsp;it&nbsp;like&nbsp;a&nbsp;pygame.<a href="pygame.html#Rect">Rect</a>.&nbsp;All&nbsp;the&nbsp;<a href="pygame.html#Rect">Rect</a>&nbsp;attributes&nbsp;and&nbsp;methods<br>
are&nbsp;available.<br>
&nbsp;<br>
In&nbsp;addition,&nbsp;there&nbsp;are&nbsp;read-only&nbsp;attributes&nbsp;for:<br>
&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Individual&nbsp;corners:&nbsp;top_center,&nbsp;right_center,&nbsp;bottom_center,&nbsp;and<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;left_center.<br>
&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Individual&nbsp;edges:&nbsp;side_a,&nbsp;side_b,&nbsp;side_c,&nbsp;side_d.<br>
&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;All&nbsp;corners&nbsp;as&nbsp;a&nbsp;tuple&nbsp;of&nbsp;coordinates:&nbsp;corners.<br>
&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;All&nbsp;edges&nbsp;as&nbsp;a&nbsp;tuple&nbsp;of&nbsp;line&nbsp;segments:&nbsp;edges.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>bottom_center</strong></dt>
</dl>
<dl><dt><strong>corners</strong></dt>
</dl>
<dl><dt><strong>edges</strong></dt>
</dl>
<dl><dt><strong>left_center</strong></dt>
</dl>
<dl><dt><strong>right_center</strong></dt>
</dl>
<dl><dt><strong>side_a</strong></dt>
</dl>
<dl><dt><strong>side_b</strong></dt>
</dl>
<dl><dt><strong>side_c</strong></dt>
</dl>
<dl><dt><strong>side_d</strong></dt>
</dl>
<dl><dt><strong>top_center</strong></dt>
</dl>
<hr>
Methods inherited from <a href="pygame.html#Rect">pygame.Rect</a>:<br>
<dl><dt><a name="Diamond-__coerce__"><strong>__coerce__</strong></a>(...)</dt><dd><tt>x.<a href="#Diamond-__coerce__">__coerce__</a>(y)&nbsp;&lt;==&gt;&nbsp;coerce(x,&nbsp;y)</tt></dd></dl>

<dl><dt><a name="Diamond-__copy__"><strong>__copy__</strong></a>(...)</dt></dl>

<dl><dt><a name="Diamond-__delitem__"><strong>__delitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Diamond-__delitem__">__delitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;del&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="Diamond-__delslice__"><strong>__delslice__</strong></a>(...)</dt><dd><tt>x.<a href="#Diamond-__delslice__">__delslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;del&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="Diamond-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#Diamond-__eq__">__eq__</a>(y)&nbsp;&lt;==&gt;&nbsp;x==y</tt></dd></dl>

<dl><dt><a name="Diamond-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#Diamond-__ge__">__ge__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&gt;=y</tt></dd></dl>

<dl><dt><a name="Diamond-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Diamond-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="Diamond-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#Diamond-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="Diamond-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#Diamond-__gt__">__gt__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&gt;y</tt></dd></dl>

<dl><dt><a name="Diamond-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#Diamond-__le__">__le__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&lt;=y</tt></dd></dl>

<dl><dt><a name="Diamond-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#Diamond-__len__">__len__</a>()&nbsp;&lt;==&gt;&nbsp;len(x)</tt></dd></dl>

<dl><dt><a name="Diamond-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#Diamond-__lt__">__lt__</a>(y)&nbsp;&lt;==&gt;&nbsp;x&lt;y</tt></dd></dl>

<dl><dt><a name="Diamond-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#Diamond-__ne__">__ne__</a>(y)&nbsp;&lt;==&gt;&nbsp;x!=y</tt></dd></dl>

<dl><dt><a name="Diamond-__nonzero__"><strong>__nonzero__</strong></a>(...)</dt><dd><tt>x.<a href="#Diamond-__nonzero__">__nonzero__</a>()&nbsp;&lt;==&gt;&nbsp;x&nbsp;!=&nbsp;0</tt></dd></dl>

<dl><dt><a name="Diamond-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="Diamond-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#Diamond-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="Diamond-__setitem__"><strong>__setitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Diamond-__setitem__">__setitem__</a>(i,&nbsp;y)&nbsp;&lt;==&gt;&nbsp;x[i]=y</tt></dd></dl>

<dl><dt><a name="Diamond-__setslice__"><strong>__setslice__</strong></a>(...)</dt><dd><tt>x.<a href="#Diamond-__setslice__">__setslice__</a>(i,&nbsp;j,&nbsp;y)&nbsp;&lt;==&gt;&nbsp;x[i:j]=y<br>
&nbsp;<br>
Use&nbsp;&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="Diamond-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#Diamond-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>

<dl><dt><a name="Diamond-clamp"><strong>clamp</strong></a>(...)</dt><dd><tt><a href="pygame.html#Rect">Rect</a>.<a href="#Diamond-clamp">clamp</a>(<a href="pygame.html#Rect">Rect</a>):&nbsp;return&nbsp;<a href="pygame.html#Rect">Rect</a><br>
moves&nbsp;the&nbsp;rectangle&nbsp;inside&nbsp;another</tt></dd></dl>

<dl><dt><a name="Diamond-clamp_ip"><strong>clamp_ip</strong></a>(...)</dt><dd><tt><a href="pygame.html#Rect">Rect</a>.<a href="#Diamond-clamp_ip">clamp_ip</a>(<a href="pygame.html#Rect">Rect</a>):&nbsp;return&nbsp;None<br>
moves&nbsp;the&nbsp;rectangle&nbsp;inside&nbsp;another,&nbsp;in&nbsp;place</tt></dd></dl>

<dl><dt><a name="Diamond-clip"><strong>clip</strong></a>(...)</dt><dd><tt><a href="pygame.html#Rect">Rect</a>.<a href="#Diamond-clip">clip</a>(<a href="pygame.html#Rect">Rect</a>):&nbsp;return&nbsp;<a href="pygame.html#Rect">Rect</a><br>
crops&nbsp;a&nbsp;rectangle&nbsp;inside&nbsp;another</tt></dd></dl>

<dl><dt><a name="Diamond-collidedict"><strong>collidedict</strong></a>(...)</dt><dd><tt><a href="pygame.html#Rect">Rect</a>.<a href="#Diamond-collidedict">collidedict</a>(dict):&nbsp;return&nbsp;(key,&nbsp;value)<br>
test&nbsp;if&nbsp;one&nbsp;rectangle&nbsp;in&nbsp;a&nbsp;dictionary&nbsp;intersects</tt></dd></dl>

<dl><dt><a name="Diamond-collidedictall"><strong>collidedictall</strong></a>(...)</dt><dd><tt><a href="pygame.html#Rect">Rect</a>.<a href="#Diamond-collidedictall">collidedictall</a>(dict):&nbsp;return&nbsp;[(key,&nbsp;value),&nbsp;...]<br>
test&nbsp;if&nbsp;all&nbsp;rectangles&nbsp;in&nbsp;a&nbsp;dictionary&nbsp;intersect</tt></dd></dl>

<dl><dt><a name="Diamond-collidelist"><strong>collidelist</strong></a>(...)</dt><dd><tt><a href="pygame.html#Rect">Rect</a>.<a href="#Diamond-collidelist">collidelist</a>(list):&nbsp;return&nbsp;index<br>
test&nbsp;if&nbsp;one&nbsp;rectangle&nbsp;in&nbsp;a&nbsp;list&nbsp;intersects</tt></dd></dl>

<dl><dt><a name="Diamond-collidelistall"><strong>collidelistall</strong></a>(...)</dt><dd><tt><a href="pygame.html#Rect">Rect</a>.<a href="#Diamond-collidelistall">collidelistall</a>(list):&nbsp;return&nbsp;indices<br>
test&nbsp;if&nbsp;all&nbsp;rectangles&nbsp;in&nbsp;a&nbsp;list&nbsp;intersect</tt></dd></dl>

<dl><dt><a name="Diamond-collidepoint"><strong>collidepoint</strong></a>(...)</dt><dd><tt><a href="pygame.html#Rect">Rect</a>.<a href="#Diamond-collidepoint">collidepoint</a>(x,&nbsp;y):&nbsp;return&nbsp;bool<br>
<a href="pygame.html#Rect">Rect</a>.<a href="#Diamond-collidepoint">collidepoint</a>((x,y)):&nbsp;return&nbsp;bool<br>
test&nbsp;if&nbsp;a&nbsp;point&nbsp;is&nbsp;inside&nbsp;a&nbsp;rectangle</tt></dd></dl>

<dl><dt><a name="Diamond-colliderect"><strong>colliderect</strong></a>(...)</dt><dd><tt><a href="pygame.html#Rect">Rect</a>.<a href="#Diamond-colliderect">colliderect</a>(<a href="pygame.html#Rect">Rect</a>):&nbsp;return&nbsp;bool<br>
test&nbsp;if&nbsp;two&nbsp;rectangles&nbsp;overlap</tt></dd></dl>

<dl><dt><a name="Diamond-contains"><strong>contains</strong></a>(...)</dt><dd><tt><a href="pygame.html#Rect">Rect</a>.<a href="#Diamond-contains">contains</a>(<a href="pygame.html#Rect">Rect</a>):&nbsp;return&nbsp;bool<br>
test&nbsp;if&nbsp;one&nbsp;rectangle&nbsp;is&nbsp;inside&nbsp;another</tt></dd></dl>

<dl><dt><a name="Diamond-copy"><strong>copy</strong></a>(...)</dt><dd><tt><a href="pygame.html#Rect">Rect</a>.<a href="#Diamond-copy">copy</a>():&nbsp;return&nbsp;<a href="pygame.html#Rect">Rect</a><br>
copy&nbsp;the&nbsp;rectangle</tt></dd></dl>

<dl><dt><a name="Diamond-fit"><strong>fit</strong></a>(...)</dt><dd><tt><a href="pygame.html#Rect">Rect</a>.<a href="#Diamond-fit">fit</a>(<a href="pygame.html#Rect">Rect</a>):&nbsp;return&nbsp;<a href="pygame.html#Rect">Rect</a><br>
resize&nbsp;and&nbsp;move&nbsp;a&nbsp;rectangle&nbsp;with&nbsp;aspect&nbsp;ratio</tt></dd></dl>

<dl><dt><a name="Diamond-inflate"><strong>inflate</strong></a>(...)</dt><dd><tt><a href="pygame.html#Rect">Rect</a>.<a href="#Diamond-inflate">inflate</a>(x,&nbsp;y):&nbsp;return&nbsp;<a href="pygame.html#Rect">Rect</a><br>
grow&nbsp;or&nbsp;shrink&nbsp;the&nbsp;rectangle&nbsp;size</tt></dd></dl>

<dl><dt><a name="Diamond-inflate_ip"><strong>inflate_ip</strong></a>(...)</dt><dd><tt><a href="pygame.html#Rect">Rect</a>.<a href="#Diamond-inflate_ip">inflate_ip</a>(x,&nbsp;y):&nbsp;return&nbsp;None<br>
grow&nbsp;or&nbsp;shrink&nbsp;the&nbsp;rectangle&nbsp;size,&nbsp;in&nbsp;place</tt></dd></dl>

<dl><dt><a name="Diamond-move"><strong>move</strong></a>(...)</dt><dd><tt><a href="pygame.html#Rect">Rect</a>.<a href="#Diamond-move">move</a>(x,&nbsp;y):&nbsp;return&nbsp;<a href="pygame.html#Rect">Rect</a><br>
moves&nbsp;the&nbsp;rectangle</tt></dd></dl>

<dl><dt><a name="Diamond-move_ip"><strong>move_ip</strong></a>(...)</dt><dd><tt><a href="pygame.html#Rect">Rect</a>.<a href="#Diamond-move_ip">move_ip</a>(x,&nbsp;y):&nbsp;return&nbsp;None<br>
moves&nbsp;the&nbsp;rectangle,&nbsp;in&nbsp;place</tt></dd></dl>

<dl><dt><a name="Diamond-normalize"><strong>normalize</strong></a>(...)</dt><dd><tt><a href="pygame.html#Rect">Rect</a>.<a href="#Diamond-normalize">normalize</a>():&nbsp;return&nbsp;None<br>
correct&nbsp;negative&nbsp;sizes</tt></dd></dl>

<dl><dt><a name="Diamond-union"><strong>union</strong></a>(...)</dt><dd><tt><a href="pygame.html#Rect">Rect</a>.<a href="#Diamond-union">union</a>(<a href="pygame.html#Rect">Rect</a>):&nbsp;return&nbsp;<a href="pygame.html#Rect">Rect</a><br>
joins&nbsp;two&nbsp;rectangles&nbsp;into&nbsp;one</tt></dd></dl>

<dl><dt><a name="Diamond-union_ip"><strong>union_ip</strong></a>(...)</dt><dd><tt><a href="pygame.html#Rect">Rect</a>.<a href="#Diamond-union_ip">union_ip</a>(<a href="pygame.html#Rect">Rect</a>):&nbsp;return&nbsp;None<br>
joins&nbsp;two&nbsp;rectangles&nbsp;into&nbsp;one,&nbsp;in&nbsp;place</tt></dd></dl>

<dl><dt><a name="Diamond-unionall"><strong>unionall</strong></a>(...)</dt><dd><tt><a href="pygame.html#Rect">Rect</a>.<a href="#Diamond-unionall">unionall</a>(Rect_sequence):&nbsp;return&nbsp;<a href="pygame.html#Rect">Rect</a><br>
the&nbsp;union&nbsp;of&nbsp;many&nbsp;rectangles</tt></dd></dl>

<dl><dt><a name="Diamond-unionall_ip"><strong>unionall_ip</strong></a>(...)</dt><dd><tt><a href="pygame.html#Rect">Rect</a>.<a href="#Diamond-unionall_ip">unionall_ip</a>(Rect_sequence):&nbsp;return&nbsp;None<br>
the&nbsp;union&nbsp;of&nbsp;many&nbsp;rectangles,&nbsp;in&nbsp;place</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="pygame.html#Rect">pygame.Rect</a>:<br>
<dl><dt><strong>__safe_for_unpickling__</strong></dt>
</dl>
<dl><dt><strong>bottom</strong></dt>
</dl>
<dl><dt><strong>bottomleft</strong></dt>
</dl>
<dl><dt><strong>bottomright</strong></dt>
</dl>
<dl><dt><strong>center</strong></dt>
</dl>
<dl><dt><strong>centerx</strong></dt>
</dl>
<dl><dt><strong>centery</strong></dt>
</dl>
<dl><dt><strong>h</strong></dt>
</dl>
<dl><dt><strong>height</strong></dt>
</dl>
<dl><dt><strong>left</strong></dt>
</dl>
<dl><dt><strong>midbottom</strong></dt>
</dl>
<dl><dt><strong>midleft</strong></dt>
</dl>
<dl><dt><strong>midright</strong></dt>
</dl>
<dl><dt><strong>midtop</strong></dt>
</dl>
<dl><dt><strong>right</strong></dt>
</dl>
<dl><dt><strong>size</strong></dt>
</dl>
<dl><dt><strong>top</strong></dt>
</dl>
<dl><dt><strong>topleft</strong></dt>
</dl>
<dl><dt><strong>topright</strong></dt>
</dl>
<dl><dt><strong>w</strong></dt>
</dl>
<dl><dt><strong>width</strong></dt>
</dl>
<dl><dt><strong>x</strong></dt>
</dl>
<dl><dt><strong>y</strong></dt>
</dl>
<hr>
Data and other attributes inherited from <a href="pygame.html#Rect">pygame.Rect</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#Diamond-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Ellipse">class <strong>Ellipse</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Ellipse-__init__"><strong>__init__</strong></a>(self, origin, radius_x, radius_y)</dt><dd><tt>Construct&nbsp;an&nbsp;instance&nbsp;of&nbsp;<a href="#Ellipse">Ellipse</a>.<br>
&nbsp;<br>
The&nbsp;origin&nbsp;argument&nbsp;is&nbsp;a&nbsp;sequence&nbsp;of&nbsp;two&nbsp;numbers&nbsp;representing&nbsp;the&nbsp;origin<br>
(x,y).<br>
&nbsp;<br>
The&nbsp;radius_x&nbsp;argument&nbsp;is&nbsp;a&nbsp;number&nbsp;representing&nbsp;the&nbsp;radius&nbsp;along&nbsp;x-axis.<br>
&nbsp;<br>
The&nbsp;radius_y&nbsp;argument&nbsp;is&nbsp;a&nbsp;number&nbsp;representing&nbsp;the&nbsp;radius&nbsp;along&nbsp;y-axis.</tt></dd></dl>

<dl><dt><a name="Ellipse-draw"><strong>draw</strong></a>(self, surface, color, arcs<font color="#909090">=360</font>)</dt><dd><tt>Draw&nbsp;an&nbsp;ellipse&nbsp;on&nbsp;a&nbsp;pygame&nbsp;surface&nbsp;in&nbsp;the&nbsp;specified&nbsp;color.<br>
&nbsp;<br>
The&nbsp;surface&nbsp;argument&nbsp;is&nbsp;the&nbsp;target&nbsp;pygame&nbsp;surface.<br>
&nbsp;<br>
The&nbsp;color&nbsp;argument&nbsp;is&nbsp;the&nbsp;pygame&nbsp;color&nbsp;to&nbsp;draw&nbsp;in.<br>
&nbsp;<br>
The&nbsp;arcs&nbsp;argument&nbsp;is&nbsp;the&nbsp;number&nbsp;of&nbsp;points&nbsp;in&nbsp;the&nbsp;circumference&nbsp;to&nbsp;draw;<br>
normally&nbsp;360&nbsp;or&nbsp;720&nbsp;will&nbsp;suffice.&nbsp;More&nbsp;than&nbsp;720&nbsp;will&nbsp;draw&nbsp;many&nbsp;duplicate<br>
pixels.</tt></dd></dl>

<dl><dt><a name="Ellipse-plot"><strong>plot</strong></a>(self, arcs<font color="#909090">=360</font>)</dt><dd><tt>Plot&nbsp;the&nbsp;circumference&nbsp;of&nbsp;an&nbsp;ellipse&nbsp;and&nbsp;return&nbsp;the&nbsp;points&nbsp;in&nbsp;a&nbsp;list.<br>
&nbsp;<br>
The&nbsp;arcs&nbsp;argument&nbsp;is&nbsp;the&nbsp;number&nbsp;of&nbsp;points&nbsp;in&nbsp;the&nbsp;circumference&nbsp;to<br>
generate;&nbsp;normally&nbsp;360&nbsp;or&nbsp;720&nbsp;will&nbsp;suffice.&nbsp;More&nbsp;than&nbsp;720&nbsp;will&nbsp;result&nbsp;in<br>
many&nbsp;duplicate&nbsp;points.<br>
&nbsp;<br>
The&nbsp;list&nbsp;that&nbsp;is&nbsp;returned&nbsp;is&nbsp;a&nbsp;sequence&nbsp;of&nbsp;(x,y)&nbsp;tuples&nbsp;suitable&nbsp;for<br>
use&nbsp;with&nbsp;pygame.draw.lines().</tt></dd></dl>

<dl><dt><a name="Ellipse-point"><strong>point</strong></a>(self, angle)</dt><dd><tt>Plot&nbsp;a&nbsp;point&nbsp;on&nbsp;the&nbsp;circumference&nbsp;of&nbsp;an&nbsp;ellipse&nbsp;at&nbsp;the&nbsp;specified&nbsp;angle.<br>
The&nbsp;point&nbsp;is&nbsp;returned&nbsp;as&nbsp;an&nbsp;(x,y)&nbsp;tuple.<br>
&nbsp;<br>
The&nbsp;angle&nbsp;argument&nbsp;is&nbsp;the&nbsp;angle&nbsp;in&nbsp;degrees&nbsp;from&nbsp;the&nbsp;origin.&nbsp;The&nbsp;angle&nbsp;0<br>
and&nbsp;360&nbsp;are&nbsp;oriented&nbsp;at&nbsp;the&nbsp;top&nbsp;of&nbsp;the&nbsp;screen,&nbsp;and&nbsp;increase&nbsp;clockwise.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>origin</strong></dt>
<dd><tt>Set&nbsp;or&nbsp;get&nbsp;origin.</tt></dd>
</dl>
<dl><dt><strong>radius_x</strong></dt>
<dd><tt>Set&nbsp;or&nbsp;get&nbsp;radius_x.</tt></dd>
</dl>
<dl><dt><strong>radius_y</strong></dt>
<dd><tt>Set&nbsp;or&nbsp;get&nbsp;radius_y.</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="LineGeometry">class <strong>LineGeometry</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="LineGeometry-__init__"><strong>__init__</strong></a>(self, x1, y1, x2, y2, position<font color="#909090">=None</font>)</dt></dl>

<dl><dt><a name="LineGeometry-getend_points"><strong>getend_points</strong></a>(self)</dt></dl>

<dl><dt><a name="LineGeometry-getp1"><strong>getp1</strong></a>(self)</dt></dl>

<dl><dt><a name="LineGeometry-getp2"><strong>getp2</strong></a>(self)</dt></dl>

<dl><dt><a name="LineGeometry-getpoints"><strong>getpoints</strong></a>(self)</dt></dl>

<dl><dt><a name="LineGeometry-getposition"><strong>getposition</strong></a>(self)</dt><dd><tt>GOTCHA:&nbsp;Something&nbsp;like&nbsp;"line_geom.position.x&nbsp;+=&nbsp;1"&nbsp;will&nbsp;not&nbsp;do&nbsp;what<br>
you&nbsp;expect.&nbsp;That&nbsp;operation&nbsp;does&nbsp;not&nbsp;update&nbsp;the&nbsp;line&nbsp;instance&nbsp;variable.<br>
Instead&nbsp;use&nbsp;"line_geom.position&nbsp;+=&nbsp;(1,0)".</tt></dd></dl>

<dl><dt><a name="LineGeometry-getx1"><strong>getx1</strong></a>(self)</dt></dl>

<dl><dt><a name="LineGeometry-getx2"><strong>getx2</strong></a>(self)</dt></dl>

<dl><dt><a name="LineGeometry-gety1"><strong>gety1</strong></a>(self)</dt></dl>

<dl><dt><a name="LineGeometry-gety2"><strong>gety2</strong></a>(self)</dt></dl>

<dl><dt><a name="LineGeometry-setp1"><strong>setp1</strong></a>(self, xorxy, y<font color="#909090">=None</font>)</dt></dl>

<dl><dt><a name="LineGeometry-setp2"><strong>setp2</strong></a>(self, xorxy, y<font color="#909090">=None</font>)</dt></dl>

<dl><dt><a name="LineGeometry-setpoints"><strong>setpoints</strong></a>(self, endpoints)</dt><dd><tt>set&nbsp;end&nbsp;points&nbsp;of&nbsp;line<br>
line.points&nbsp;=&nbsp;x1,y1,x2,y2<br>
line.points&nbsp;=&nbsp;(x1,y1),(x2,y2)</tt></dd></dl>

<dl><dt><a name="LineGeometry-setposition"><strong>setposition</strong></a>(self, val)</dt></dl>

<dl><dt><a name="LineGeometry-setx1"><strong>setx1</strong></a>(self, val)</dt></dl>

<dl><dt><a name="LineGeometry-setx2"><strong>setx2</strong></a>(self, val)</dt></dl>

<dl><dt><a name="LineGeometry-sety1"><strong>sety1</strong></a>(self, val)</dt></dl>

<dl><dt><a name="LineGeometry-sety2"><strong>sety2</strong></a>(self, val)</dt></dl>

<hr>
Static methods defined here:<br>
<dl><dt><a name="LineGeometry-collided"><strong>collided</strong></a> = line_collided_other(self, other, rect_pre_tested<font color="#909090">=None</font>)</dt><dd><tt>Return&nbsp;results&nbsp;of&nbsp;collision&nbsp;test&nbsp;between&nbsp;a&nbsp;line&nbsp;and&nbsp;other&nbsp;geometry.<br>
&nbsp;<br>
self&nbsp;is&nbsp;a&nbsp;line,&nbsp;it&nbsp;must&nbsp;have&nbsp;an&nbsp;end_points&nbsp;attr.<br>
&nbsp;<br>
See&nbsp;circle_collided_other&nbsp;description&nbsp;for&nbsp;other&nbsp;details.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>end_points</strong></dt>
</dl>
<dl><dt><strong>p1</strong></dt>
</dl>
<dl><dt><strong>p2</strong></dt>
</dl>
<dl><dt><strong>points</strong></dt>
</dl>
<dl><dt><strong>position</strong></dt>
<dd><tt>GOTCHA:&nbsp;Something&nbsp;like&nbsp;"line_geom.position.x&nbsp;+=&nbsp;1"&nbsp;will&nbsp;not&nbsp;do&nbsp;what<br>
you&nbsp;expect.&nbsp;That&nbsp;operation&nbsp;does&nbsp;not&nbsp;update&nbsp;the&nbsp;line&nbsp;instance&nbsp;variable.<br>
Instead&nbsp;use&nbsp;"line_geom.position&nbsp;+=&nbsp;(1,0)".</tt></dd>
</dl>
<dl><dt><strong>x1</strong></dt>
</dl>
<dl><dt><strong>x2</strong></dt>
</dl>
<dl><dt><strong>y1</strong></dt>
</dl>
<dl><dt><strong>y2</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="PolyGeometry">class <strong>PolyGeometry</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="PolyGeometry-__init__"><strong>__init__</strong></a>(self, points, position<font color="#909090">=None</font>)</dt></dl>

<dl><dt><a name="PolyGeometry-getpoints"><strong>getpoints</strong></a>(self)</dt></dl>

<dl><dt><a name="PolyGeometry-getposition"><strong>getposition</strong></a>(self)</dt><dd><tt>GOTCHA:&nbsp;Something&nbsp;like&nbsp;"poly_geom.position.x&nbsp;+=&nbsp;1"&nbsp;will&nbsp;not&nbsp;do&nbsp;what<br>
you&nbsp;expect.&nbsp;That&nbsp;operation&nbsp;does&nbsp;not&nbsp;update&nbsp;the&nbsp;rect&nbsp;instance&nbsp;variable.<br>
Instead&nbsp;use&nbsp;"poly_geom.position&nbsp;+=&nbsp;(1,0)".</tt></dd></dl>

<dl><dt><a name="PolyGeometry-setposition"><strong>setposition</strong></a>(self, val)</dt></dl>

<hr>
Static methods defined here:<br>
<dl><dt><a name="PolyGeometry-collided"><strong>collided</strong></a> = poly_collided_other(self, other, rect_pre_tested<font color="#909090">=None</font>)</dt><dd><tt>Return&nbsp;results&nbsp;of&nbsp;collision&nbsp;test&nbsp;between&nbsp;a&nbsp;poly&nbsp;and&nbsp;other&nbsp;geometry.<br>
&nbsp;<br>
self&nbsp;is&nbsp;a&nbsp;poly,&nbsp;it&nbsp;must&nbsp;have&nbsp;a&nbsp;points&nbsp;attr.<br>
&nbsp;<br>
See&nbsp;circle_collided_other&nbsp;description&nbsp;for&nbsp;other&nbsp;details.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>points</strong></dt>
</dl>
<dl><dt><strong>position</strong></dt>
<dd><tt>GOTCHA:&nbsp;Something&nbsp;like&nbsp;"poly_geom.position.x&nbsp;+=&nbsp;1"&nbsp;will&nbsp;not&nbsp;do&nbsp;what<br>
you&nbsp;expect.&nbsp;That&nbsp;operation&nbsp;does&nbsp;not&nbsp;update&nbsp;the&nbsp;rect&nbsp;instance&nbsp;variable.<br>
Instead&nbsp;use&nbsp;"poly_geom.position&nbsp;+=&nbsp;(1,0)".</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="RectGeometry">class <strong>RectGeometry</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="RectGeometry-__init__"><strong>__init__</strong></a>(self, x, y, width, height, position<font color="#909090">=None</font>)</dt></dl>

<dl><dt><a name="RectGeometry-getpoints"><strong>getpoints</strong></a>(self)</dt></dl>

<dl><dt><a name="RectGeometry-getposition"><strong>getposition</strong></a>(self)</dt><dd><tt>GOTCHA:&nbsp;Something&nbsp;like&nbsp;"rect_geom.position.x&nbsp;+=&nbsp;1"&nbsp;will&nbsp;not&nbsp;do&nbsp;what<br>
you&nbsp;expect.&nbsp;That&nbsp;operation&nbsp;does&nbsp;not&nbsp;update&nbsp;the&nbsp;rect&nbsp;instance&nbsp;variable.<br>
Instead&nbsp;use&nbsp;"rect_geom.position&nbsp;+=&nbsp;(1,0)".</tt></dd></dl>

<dl><dt><a name="RectGeometry-setposition"><strong>setposition</strong></a>(self, val)</dt></dl>

<hr>
Static methods defined here:<br>
<dl><dt><a name="RectGeometry-collided"><strong>collided</strong></a> = rect_collided_other(self, other, rect_pre_tested<font color="#909090">=None</font>)</dt><dd><tt>Return&nbsp;results&nbsp;of&nbsp;collision&nbsp;test&nbsp;between&nbsp;a&nbsp;rect&nbsp;and&nbsp;other&nbsp;geometry.<br>
&nbsp;<br>
self&nbsp;is&nbsp;a&nbsp;rect,&nbsp;it&nbsp;must&nbsp;have&nbsp;a&nbsp;rect&nbsp;attr.<br>
&nbsp;<br>
See&nbsp;circle_collided_other&nbsp;description&nbsp;for&nbsp;other&nbsp;details.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>points</strong></dt>
</dl>
<dl><dt><strong>position</strong></dt>
<dd><tt>GOTCHA:&nbsp;Something&nbsp;like&nbsp;"rect_geom.position.x&nbsp;+=&nbsp;1"&nbsp;will&nbsp;not&nbsp;do&nbsp;what<br>
you&nbsp;expect.&nbsp;That&nbsp;operation&nbsp;does&nbsp;not&nbsp;update&nbsp;the&nbsp;rect&nbsp;instance&nbsp;variable.<br>
Instead&nbsp;use&nbsp;"rect_geom.position&nbsp;+=&nbsp;(1,0)".</tt></dd>
</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-angle_of"><strong>angle_of</strong></a>(origin, end_point)</dt><dd><tt>Calculate&nbsp;the&nbsp;angle&nbsp;between&nbsp;the&nbsp;vector&nbsp;defined&nbsp;by&nbsp;end&nbsp;points&nbsp;(origin,point)<br>
and&nbsp;the&nbsp;Y&nbsp;axis.&nbsp;All&nbsp;input&nbsp;and&nbsp;output&nbsp;values&nbsp;are&nbsp;in&nbsp;terms&nbsp;of&nbsp;pygame&nbsp;screen<br>
space.&nbsp;Returns&nbsp;degrees&nbsp;as&nbsp;a&nbsp;float.<br>
&nbsp;<br>
The&nbsp;origin&nbsp;argument&nbsp;is&nbsp;a&nbsp;sequence&nbsp;of&nbsp;two&nbsp;numbers&nbsp;representing&nbsp;the&nbsp;origin<br>
point.<br>
&nbsp;<br>
The&nbsp;point&nbsp;argument&nbsp;is&nbsp;a&nbsp;sequence&nbsp;of&nbsp;two&nbsp;numbers&nbsp;representing&nbsp;the&nbsp;end&nbsp;point.<br>
&nbsp;<br>
The&nbsp;angle&nbsp;0&nbsp;and&nbsp;360&nbsp;are&nbsp;oriented&nbsp;at&nbsp;the&nbsp;top&nbsp;of&nbsp;the&nbsp;screen,&nbsp;and&nbsp;increase<br>
clockwise.</tt></dd></dl>
 <dl><dt><a name="-atan2"><strong>atan2</strong></a>(...)</dt><dd><tt><a href="#-atan2">atan2</a>(y,&nbsp;x)<br>
&nbsp;<br>
Return&nbsp;the&nbsp;arc&nbsp;tangent&nbsp;(measured&nbsp;in&nbsp;radians)&nbsp;of&nbsp;y/x.<br>
Unlike&nbsp;atan(y/x),&nbsp;the&nbsp;signs&nbsp;of&nbsp;both&nbsp;x&nbsp;and&nbsp;y&nbsp;are&nbsp;considered.</tt></dd></dl>
 <dl><dt><a name="-circle_collided_other"><strong>circle_collided_other</strong></a>(self, other, rect_pre_tested<font color="#909090">=None</font>)</dt><dd><tt>Return&nbsp;results&nbsp;of&nbsp;collision&nbsp;test&nbsp;between&nbsp;a&nbsp;circle&nbsp;and&nbsp;other&nbsp;geometry.<br>
&nbsp;<br>
The&nbsp;*_collided_other()&nbsp;functions&nbsp;provide&nbsp;a&nbsp;convenient&nbsp;means&nbsp;to&nbsp;test<br>
disparate&nbsp;geometries&nbsp;for&nbsp;collision.&nbsp;The&nbsp;logic&nbsp;considers&nbsp;containment&nbsp;to&nbsp;be<br>
a&nbsp;collision.&nbsp;The&nbsp;tests&nbsp;do&nbsp;not&nbsp;check&nbsp;for&nbsp;the&nbsp;"self&nbsp;is&nbsp;other"&nbsp;condition.<br>
&nbsp;<br>
self&nbsp;is&nbsp;a&nbsp;circle,&nbsp;it&nbsp;must&nbsp;have&nbsp;origin&nbsp;and&nbsp;radius&nbsp;attrs.<br>
&nbsp;<br>
If&nbsp;other&nbsp;does&nbsp;not&nbsp;have&nbsp;a&nbsp;collided&nbsp;attr,&nbsp;then&nbsp;a&nbsp;circle-vs-rect&nbsp;result&nbsp;is<br>
returned.<br>
&nbsp;<br>
Otherwise...<br>
&nbsp;<br>
other&nbsp;must&nbsp;have&nbsp;attr&nbsp;collided.&nbsp;collided&nbsp;must&nbsp;be&nbsp;a&nbsp;staticmethod<br>
*_collided_other&nbsp;function&nbsp;or&nbsp;a&nbsp;custom&nbsp;function&nbsp;in&nbsp;that&nbsp;form.&nbsp;If&nbsp;collided&nbsp;is<br>
not&nbsp;one&nbsp;of&nbsp;the&nbsp;*_collided_other&nbsp;functions,&nbsp;other's&nbsp;collided&nbsp;function&nbsp;will<br>
be&nbsp;called&nbsp;passing&nbsp;arguments&nbsp;other&nbsp;and&nbsp;self&nbsp;in&nbsp;that&nbsp;order.<br>
&nbsp;<br>
other's&nbsp;collided&nbsp;attr&nbsp;dictates&nbsp;the&nbsp;kind&nbsp;of&nbsp;self-vs-other&nbsp;collision&nbsp;test.&nbsp;The<br>
builtin&nbsp;collision&nbsp;tests&nbsp;are:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;1.&nbsp;&nbsp;If&nbsp;other.collided&nbsp;is&nbsp;circle_collided_other,&nbsp;other&nbsp;is&nbsp;assumed&nbsp;to&nbsp;be&nbsp;a<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;circle&nbsp;with&nbsp;origin&nbsp;and&nbsp;radius&nbsp;attrs.<br>
&nbsp;&nbsp;&nbsp;&nbsp;2.&nbsp;&nbsp;If&nbsp;other.collided&nbsp;is&nbsp;rect_collided_other,&nbsp;other&nbsp;is&nbsp;assumed&nbsp;to&nbsp;be&nbsp;a<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rect&nbsp;with&nbsp;a&nbsp;rect&nbsp;attr.<br>
&nbsp;&nbsp;&nbsp;&nbsp;3.&nbsp;&nbsp;If&nbsp;other.collided&nbsp;is&nbsp;poly_collided_other,&nbsp;other&nbsp;is&nbsp;assumed&nbsp;to&nbsp;be&nbsp;a<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;poly&nbsp;with&nbsp;a&nbsp;points&nbsp;attr.<br>
&nbsp;&nbsp;&nbsp;&nbsp;4.&nbsp;&nbsp;If&nbsp;other.collided&nbsp;is&nbsp;line_collided_other,&nbsp;other&nbsp;is&nbsp;assumed&nbsp;to&nbsp;be&nbsp;a<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;line&nbsp;with&nbsp;an&nbsp;end_points&nbsp;attr.<br>
&nbsp;<br>
The&nbsp;fall-through&nbsp;action&nbsp;is&nbsp;to&nbsp;call&nbsp;other.collided(other,&nbsp;self),&nbsp;which&nbsp;is<br>
assumed&nbsp;to&nbsp;be&nbsp;a&nbsp;custom&nbsp;staticmethod&nbsp;function.<br>
&nbsp;<br>
Here&nbsp;is&nbsp;an&nbsp;example&nbsp;minimal&nbsp;class&nbsp;and&nbsp;usage:<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;class&nbsp;CircleGeom(<a href="__builtin__.html#object">object</a>):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def&nbsp;__init__(self,&nbsp;**kwargs):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.<strong>__dict__</strong>.update(kwargs)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collided&nbsp;=&nbsp;staticmethod(circle_collided_other)<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;circle&nbsp;=&nbsp;CircleGeom(origin=(300,300),&nbsp;radius=25)<br>
&nbsp;&nbsp;&nbsp;&nbsp;circle.collide(circle,&nbsp;other_poly)</tt></dd></dl>
 <dl><dt><a name="-circle_intersects_circle"><strong>circle_intersects_circle</strong></a>(origin1, radius1, origin2, radius2)</dt><dd><tt>Circle&nbsp;vs&nbsp;circle&nbsp;collision&nbsp;test.<br>
&nbsp;<br>
Return&nbsp;True&nbsp;if&nbsp;circles&nbsp;intersect,&nbsp;else&nbsp;return&nbsp;False.</tt></dd></dl>
 <dl><dt><a name="-circle_intersects_line"><strong>circle_intersects_line</strong></a>(origin, radius, line_segment)</dt><dd><tt>Circle&nbsp;vs&nbsp;line&nbsp;collision&nbsp;test.<br>
&nbsp;<br>
Return&nbsp;True&nbsp;if&nbsp;line_segment&nbsp;intersects&nbsp;the&nbsp;circle&nbsp;defined&nbsp;by&nbsp;origin&nbsp;and<br>
radius.&nbsp;Return&nbsp;False&nbsp;if&nbsp;they&nbsp;do&nbsp;not&nbsp;intersect.</tt></dd></dl>
 <dl><dt><a name="-circle_intersects_poly"><strong>circle_intersects_poly</strong></a>(origin, radius, points)</dt><dd><tt>Circle&nbsp;vs&nbsp;polygon&nbsp;collision&nbsp;test.<br>
&nbsp;<br>
Points&nbsp;must&nbsp;describe&nbsp;a&nbsp;"closed"&nbsp;polygon&nbsp;with&nbsp;no&nbsp;redundant&nbsp;points.&nbsp;Winding&nbsp;is<br>
a&nbsp;factor.</tt></dd></dl>
 <dl><dt><a name="-circle_intersects_rect"><strong>circle_intersects_rect</strong></a>(origin, radius, rect)</dt><dd><tt>Circle&nbsp;vs&nbsp;rect&nbsp;collision&nbsp;test.<br>
&nbsp;<br>
Return&nbsp;True&nbsp;if&nbsp;the&nbsp;shapes&nbsp;intersect,&nbsp;else&nbsp;return&nbsp;False.&nbsp;rect&nbsp;must&nbsp;be&nbsp;a<br>
pygame.<a href="pygame.html#Rect">Rect</a>().</tt></dd></dl>
 <dl><dt><a name="-cos"><strong>cos</strong></a>(...)</dt><dd><tt><a href="#-cos">cos</a>(x)<br>
&nbsp;<br>
Return&nbsp;the&nbsp;cosine&nbsp;of&nbsp;x&nbsp;(measured&nbsp;in&nbsp;radians).</tt></dd></dl>
 <dl><dt><a name="-distance"><strong>distance</strong></a>(a, b)</dt><dd><tt>Calculate&nbsp;the&nbsp;distance&nbsp;between&nbsp;points&nbsp;a&nbsp;and&nbsp;b.&nbsp;Returns&nbsp;distance&nbsp;as&nbsp;a&nbsp;float.<br>
&nbsp;<br>
The&nbsp;a&nbsp;argument&nbsp;is&nbsp;a&nbsp;sequence&nbsp;representing&nbsp;one&nbsp;end&nbsp;point&nbsp;(x1,y1).<br>
&nbsp;<br>
The&nbsp;b&nbsp;argument&nbsp;is&nbsp;a&nbsp;sequence&nbsp;representing&nbsp;the&nbsp;other&nbsp;end&nbsp;point&nbsp;(x2,y2).</tt></dd></dl>
 <dl><dt><a name="-interpolant_of_line"><strong>interpolant_of_line</strong></a>(mag, (x1, y1), (x2, y2))</dt><dd><tt>Find&nbsp;the&nbsp;point&nbsp;at&nbsp;magnitude&nbsp;mag&nbsp;along&nbsp;a&nbsp;line.</tt></dd></dl>
 <dl><dt><a name="-line_collided_other"><strong>line_collided_other</strong></a>(self, other, rect_pre_tested<font color="#909090">=None</font>)</dt><dd><tt>Return&nbsp;results&nbsp;of&nbsp;collision&nbsp;test&nbsp;between&nbsp;a&nbsp;line&nbsp;and&nbsp;other&nbsp;geometry.<br>
&nbsp;<br>
self&nbsp;is&nbsp;a&nbsp;line,&nbsp;it&nbsp;must&nbsp;have&nbsp;an&nbsp;end_points&nbsp;attr.<br>
&nbsp;<br>
See&nbsp;circle_collided_other&nbsp;description&nbsp;for&nbsp;other&nbsp;details.</tt></dd></dl>
 <dl><dt><a name="-line_intersects_line"><strong>line_intersects_line</strong></a>(line_1, line_2)</dt><dd><tt>Line&nbsp;vs&nbsp;line&nbsp;collision&nbsp;test.<br>
&nbsp;<br>
Returns&nbsp;[x,y]&nbsp;if&nbsp;the&nbsp;lines&nbsp;intersect,&nbsp;otherwise&nbsp;[].&nbsp;[x,y]&nbsp;is&nbsp;the&nbsp;point<br>
of&nbsp;intersection.<br>
&nbsp;<br>
The&nbsp;return&nbsp;values&nbsp;are&nbsp;suitable&nbsp;for&nbsp;"if&nbsp;collided:&nbsp;...&nbsp;else:&nbsp;..."&nbsp;usage.<br>
Accessing&nbsp;the&nbsp;(x,y)&nbsp;values&nbsp;is&nbsp;optional.</tt></dd></dl>
 <dl><dt><a name="-line_intersects_poly"><strong>line_intersects_poly</strong></a>(line, points, fast<font color="#909090">=True</font>)</dt><dd><tt>Line&nbsp;vs&nbsp;poly&nbsp;test.<br>
&nbsp;<br>
Tests&nbsp;a&nbsp;line&nbsp;against&nbsp;a&nbsp;polygon.&nbsp;Returns&nbsp;a&nbsp;list&nbsp;of&nbsp;intersecting<br>
(x,y)&nbsp;pairs,&nbsp;or&nbsp;an&nbsp;emtpy&nbsp;list&nbsp;if&nbsp;there&nbsp;are&nbsp;no&nbsp;collisions.<br>
&nbsp;<br>
This&nbsp;does&nbsp;not&nbsp;detect&nbsp;containment.&nbsp;<a href="#-point_in_poly">point_in_poly</a>()&nbsp;can&nbsp;be&nbsp;used&nbsp;to&nbsp;test&nbsp;for<br>
containment.</tt></dd></dl>
 <dl><dt><a name="-line_intersects_rect"><strong>line_intersects_rect</strong></a>(line, rect, fast<font color="#909090">=True</font>)</dt><dd><tt>Line&nbsp;vs&nbsp;rect&nbsp;intersection&nbsp;test.<br>
&nbsp;<br>
rect&nbsp;must&nbsp;be&nbsp;a&nbsp;pygame.<a href="pygame.html#Rect">Rect</a>().<br>
&nbsp;<br>
Tests&nbsp;a&nbsp;line&nbsp;against&nbsp;the&nbsp;edges&nbsp;of&nbsp;a&nbsp;rect.&nbsp;Returns&nbsp;a&nbsp;list&nbsp;of&nbsp;intersecting<br>
(x,y)&nbsp;pairs,&nbsp;or&nbsp;an&nbsp;emtpy&nbsp;list&nbsp;if&nbsp;there&nbsp;are&nbsp;no&nbsp;collisions.<br>
&nbsp;<br>
This&nbsp;does&nbsp;not&nbsp;detect&nbsp;containment.&nbsp;<a href="#-point_in_poly">point_in_poly</a>()&nbsp;can&nbsp;be&nbsp;used&nbsp;to&nbsp;test&nbsp;for<br>
containment.</tt></dd></dl>
 <dl><dt><a name="-lines_intersect_lines"><strong>lines_intersect_lines</strong></a>(lines1, lines2, fast<font color="#909090">=True</font>)</dt><dd><tt>Line&nbsp;lists&nbsp;intersection&nbsp;test.<br>
&nbsp;<br>
Tests&nbsp;one&nbsp;list&nbsp;of&nbsp;lines&nbsp;against&nbsp;another.&nbsp;Returns&nbsp;a&nbsp;list&nbsp;of&nbsp;intersecting<br>
(x,y)&nbsp;pairs,&nbsp;or&nbsp;an&nbsp;emtpy&nbsp;list&nbsp;if&nbsp;there&nbsp;are&nbsp;no&nbsp;collisions.<br>
&nbsp;<br>
This&nbsp;does&nbsp;not&nbsp;detect&nbsp;containment.&nbsp;<a href="#-point_in_poly">point_in_poly</a>()&nbsp;can&nbsp;be&nbsp;used&nbsp;to&nbsp;test&nbsp;for<br>
containment.</tt></dd></dl>
 <dl><dt><a name="-point_in_poly"><strong>point_in_poly</strong></a>(point, poly)</dt><dd><tt>Point&nbsp;vs&nbsp;polygon&nbsp;collision&nbsp;test.<br>
&nbsp;<br>
Poly&nbsp;is&nbsp;assumed&nbsp;to&nbsp;be&nbsp;a&nbsp;sequence&nbsp;of&nbsp;points,&nbsp;length&nbsp;&gt;=&nbsp;3,&nbsp;with&nbsp;no&nbsp;duplicate<br>
points.&nbsp;Winding&nbsp;is&nbsp;not&nbsp;a&nbsp;factor.</tt></dd></dl>
 <dl><dt><a name="-point_on_circumference"><strong>point_on_circumference</strong></a>(center, radius, degrees_)</dt><dd><tt>Calculate&nbsp;the&nbsp;point&nbsp;on&nbsp;the&nbsp;circumference&nbsp;of&nbsp;a&nbsp;circle&nbsp;defined&nbsp;by&nbsp;center&nbsp;and<br>
radius&nbsp;along&nbsp;the&nbsp;given&nbsp;angle.&nbsp;Returns&nbsp;a&nbsp;tuple&nbsp;(x,y).<br>
&nbsp;<br>
The&nbsp;center&nbsp;argument&nbsp;is&nbsp;a&nbsp;representing&nbsp;the&nbsp;origin&nbsp;of&nbsp;the&nbsp;circle.<br>
&nbsp;<br>
The&nbsp;radius&nbsp;argument&nbsp;is&nbsp;a&nbsp;number&nbsp;representing&nbsp;the&nbsp;length&nbsp;of&nbsp;the&nbsp;radius.<br>
&nbsp;<br>
The&nbsp;degrees_&nbsp;argument&nbsp;is&nbsp;a&nbsp;number&nbsp;representing&nbsp;the&nbsp;angle&nbsp;of&nbsp;radius&nbsp;from<br>
origin.&nbsp;The&nbsp;angles&nbsp;0&nbsp;and&nbsp;360&nbsp;are&nbsp;at&nbsp;the&nbsp;top&nbsp;of&nbsp;the&nbsp;screen,&nbsp;with&nbsp;values<br>
increasing&nbsp;clockwise.</tt></dd></dl>
 <dl><dt><a name="-points_to_lines"><strong>points_to_lines</strong></a>(points)</dt><dd><tt>Return&nbsp;a&nbsp;list&nbsp;of&nbsp;end-point&nbsp;pairs&nbsp;assembled&nbsp;from&nbsp;a&nbsp;"closed"&nbsp;polygon's<br>
points.</tt></dd></dl>
 <dl><dt><a name="-poly_collided_other"><strong>poly_collided_other</strong></a>(self, other, rect_pre_tested<font color="#909090">=None</font>)</dt><dd><tt>Return&nbsp;results&nbsp;of&nbsp;collision&nbsp;test&nbsp;between&nbsp;a&nbsp;poly&nbsp;and&nbsp;other&nbsp;geometry.<br>
&nbsp;<br>
self&nbsp;is&nbsp;a&nbsp;poly,&nbsp;it&nbsp;must&nbsp;have&nbsp;a&nbsp;points&nbsp;attr.<br>
&nbsp;<br>
See&nbsp;circle_collided_other&nbsp;description&nbsp;for&nbsp;other&nbsp;details.</tt></dd></dl>
 <dl><dt><a name="-poly_intersects_poly"><strong>poly_intersects_poly</strong></a>(points1, points2, fast<font color="#909090">=True</font>)</dt><dd><tt>Poly&nbsp;vs&nbsp;poly&nbsp;intersection&nbsp;test.<br>
&nbsp;<br>
Tests&nbsp;a&nbsp;polygon&nbsp;against&nbsp;another&nbsp;polygon.&nbsp;Returns&nbsp;a&nbsp;list&nbsp;of&nbsp;intersecting<br>
(x,y)&nbsp;pairs,&nbsp;or&nbsp;an&nbsp;emtpy&nbsp;list&nbsp;if&nbsp;there&nbsp;are&nbsp;no&nbsp;collisions.<br>
&nbsp;<br>
This&nbsp;does&nbsp;not&nbsp;detect&nbsp;containment.&nbsp;<a href="#-point_in_poly">point_in_poly</a>()&nbsp;can&nbsp;be&nbsp;used&nbsp;to&nbsp;test&nbsp;for<br>
containment.</tt></dd></dl>
 <dl><dt><a name="-poly_intersects_rect"><strong>poly_intersects_rect</strong></a>(points, rect, fast<font color="#909090">=True</font>)</dt><dd><tt>Poly&nbsp;vs&nbsp;rect&nbsp;intersection&nbsp;test.<br>
&nbsp;<br>
Tests&nbsp;a&nbsp;polygon&nbsp;against&nbsp;a&nbsp;rect.&nbsp;rect&nbsp;must&nbsp;be&nbsp;a&nbsp;pygame.<a href="pygame.html#Rect">Rect</a>().&nbsp;Returns&nbsp;a<br>
list&nbsp;of&nbsp;intersecting&nbsp;(x,y)&nbsp;pairs,&nbsp;or&nbsp;an&nbsp;emtpy&nbsp;list&nbsp;if&nbsp;there&nbsp;are&nbsp;no<br>
collisions.<br>
&nbsp;<br>
This&nbsp;does&nbsp;not&nbsp;detect&nbsp;containment.&nbsp;<a href="#-point_in_poly">point_in_poly</a>()&nbsp;can&nbsp;be&nbsp;used&nbsp;to&nbsp;test&nbsp;for<br>
containment.</tt></dd></dl>
 <dl><dt><a name="-radians"><strong>radians</strong></a>(...)</dt><dd><tt><a href="#-radians">radians</a>(x)<br>
&nbsp;<br>
Convert&nbsp;angle&nbsp;x&nbsp;from&nbsp;degrees&nbsp;to&nbsp;radians.</tt></dd></dl>
 <dl><dt><a name="-rect_collided_other"><strong>rect_collided_other</strong></a>(self, other, rect_pre_tested<font color="#909090">=None</font>)</dt><dd><tt>Return&nbsp;results&nbsp;of&nbsp;collision&nbsp;test&nbsp;between&nbsp;a&nbsp;rect&nbsp;and&nbsp;other&nbsp;geometry.<br>
&nbsp;<br>
self&nbsp;is&nbsp;a&nbsp;rect,&nbsp;it&nbsp;must&nbsp;have&nbsp;a&nbsp;rect&nbsp;attr.<br>
&nbsp;<br>
See&nbsp;circle_collided_other&nbsp;description&nbsp;for&nbsp;other&nbsp;details.</tt></dd></dl>
 <dl><dt><a name="-rect_to_lines"><strong>rect_to_lines</strong></a>(rect)</dt><dd><tt>Return&nbsp;a&nbsp;list&nbsp;of&nbsp;end-point&nbsp;pairs&nbsp;assembled&nbsp;from&nbsp;a&nbsp;pygame.<a href="pygame.html#Rect">Rect</a>'s&nbsp;corners.</tt></dd></dl>
 <dl><dt><a name="-sin"><strong>sin</strong></a>(...)</dt><dd><tt><a href="#-sin">sin</a>(x)<br>
&nbsp;<br>
Return&nbsp;the&nbsp;sine&nbsp;of&nbsp;x&nbsp;(measured&nbsp;in&nbsp;radians).</tt></dd></dl>
 <dl><dt><a name="-sqrt"><strong>sqrt</strong></a>(...)</dt><dd><tt><a href="#-sqrt">sqrt</a>(x)<br>
&nbsp;<br>
Return&nbsp;the&nbsp;square&nbsp;root&nbsp;of&nbsp;x.</tt></dd></dl>
 <dl><dt><a name="-step_toward_point"><strong>step_toward_point</strong></a>((x1, y1), (x2, y2), distance)</dt><dd><tt>Calculate&nbsp;the&nbsp;point&nbsp;at&nbsp;a&nbsp;given&nbsp;distance&nbsp;along&nbsp;the&nbsp;line&nbsp;with&nbsp;end&nbsp;points<br>
(x1,y1)&nbsp;and&nbsp;(x2,y2).<br>
&nbsp;<br>
This&nbsp;function&nbsp;is&nbsp;about&nbsp;twice&nbsp;as&nbsp;fast&nbsp;as&nbsp;the&nbsp;combination&nbsp;<a href="#-angle_of">angle_of</a>()&nbsp;and<br>
<a href="#-point_on_circumference">point_on_circumference</a>().<br>
&nbsp;<br>
The&nbsp;(x1,y1)&nbsp;argument&nbsp;is&nbsp;the&nbsp;origin.<br>
&nbsp;<br>
The&nbsp;(x2,y2)&nbsp;argument&nbsp;is&nbsp;the&nbsp;destination.<br>
&nbsp;<br>
The&nbsp;distance&nbsp;argument&nbsp;is&nbsp;the&nbsp;size&nbsp;of&nbsp;the&nbsp;step,&nbsp;or&nbsp;speed.</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>__author__</strong> = 'Gummbum, (c) 2011-2013'<br>
<strong>__version__</strong> = '$Id: geometry.py 410 2013-08-18 06:19:10Z stabbingfinger@gmail.com $'<br>
<strong>pi</strong> = 3.1415926535897931</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
    
<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Gummbum,&nbsp;(c)&nbsp;2011-2013</td></tr></table>
</body></html>